<template>
  <div>
    <!-- <div style="display:flex;justify-content: center; align-items: center;">
      <img src="@/assets/img/logo.png" style="width:111px;height:62px;" alt />
      <div
        style="padding:20px;display:flex;flex-direction:column;justify-content:center;align-items:center;"
      >
        <div style="font-size:16px;letter-spacing:3px;">浦东国际机场货运站有限公司生产运行部</div>
        <div style="font-size:24px;font-weight:600;letter-spacing:2px;margin:10px 0">进港航班报告</div>
        <div style="font-size:16px;">PACTL INBOUND FLIGHT REPORT</div>
      </div>
    </div>-->
    <div class="reportBox tborder">
      <el-form size="mini" label-width="180px">
        <div class="boxRow">
          <div class="rowItem">
            <el-form-item label="航班号（Flight No.）:">
              <el-input style="width:200px" disabled v-model="dataForm.FLIGHT_NUM" placeholder></el-input>
            </el-form-item>
          </div>
          <div class="rowItem">
            <el-form-item label="日期（Date）:">
              <el-date-picker
                disabled
                style="width:200px"
                v-model="dataForm.FLIGHT_DATE"
                type="date"
                value-format="yyyy-MM-dd"
                format="yyyy-MM-dd"
                placeholder="选择日期时间"
              ></el-date-picker>
            </el-form-item>
          </div>
        </div>
        <div class="boxRow">
          <div class="rowItem">
            <el-form-item label="始发地（DEP）:">
              <el-input style="width:200px" disabled v-model="dataForm.FLIGHT_FROM" placeholder></el-input>
            </el-form-item>
          </div>
          <div class="rowItem">
            <el-form-item label="目的地（DEST）:">
              <el-input style="width:200px" disabled v-model="dataForm.FLIGHT_TO" placeholder></el-input>
            </el-form-item>
          </div>
        </div>
        <div class="boxRow">
          <div class="rowItem">
            <el-form-item label="航班实际落地时间：">
              <el-date-picker
                style="width:200px"
                value-format="yyyy-MM-dd HH:mm"
                format="yyyy-MM-dd HH:mm"
                v-model="dataForm.AIRRELA_DOWN_TIME"
                type="datetime"
                placeholder="选择日期时间"
              ></el-date-picker>
            </el-form-item>
          </div>
          <div class="rowItem">
            <el-form-item label="航班计划落地时间：">
              <el-date-picker
                style="width:200px"
                value-format="yyyy-MM-dd HH:mm"
                format="yyyy-MM-dd HH:mm"
                v-model="dataForm.AIRPLAN_DOWN_TIME"
                type="datetime"
                placeholder="选择日期时间"
              ></el-date-picker>
            </el-form-item>
          </div>
        </div>
        <div class="boxRow">
          <div class="rowItem">
            <el-form-item label="机型：">
              <el-input style="width:200px" disabled v-model="dataForm.AIR_TYPE" placeholder></el-input>
            </el-form-item>
          </div>
          <div class="rowItem">
            <el-form-item label="ICFR发送时间：">
              <el-date-picker
                disabled
                style="width:200px"
                value-format="yyyy-MM-dd HH:mm"
                format="yyyy-MM-dd HH:mm"
                v-model="dataForm.IFCR_SEND_TIME"
                type="datetime"
                placeholder="选择日期时间"
              ></el-date-picker>
            </el-form-item>
          </div>
        </div>
        <div style="text-align:right;padding:10px 20px" v-if="formId">
          <!-- <el-button type="primary">修改</el-button> -->
          <el-button v-if="isAuthBtn('edit')" size="mini" type="success" @click="dataFormSubmit()">保存</el-button>
        </div>
      </el-form>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    formId: {
      default: 0
    }
  },
  data() {
    return {
      dataForm: {
        FLIGHT_NUM: ""
      }
    };
  },
  methods: {
    init(data) {
      this.dataForm = Object.assign({}, this.dataForm, data);
    },
    dataFormSubmit() {
      this.$http({
        url: this.$http.adornUrl(`/air/airReport_baseInfo_save`),
        method: "post",
        data: this.$http.adornData(this.dataForm)
      }).then(({ data }) => {
        if (data.result == "1") {
          this.$message({
            message: "操作成功",
            type: "success",
            duration: 1500,
            onClose: () => {
              this.$emit("refsherData", sessionStorage.reportid);
            }
          });
        } else {
          this.$message.error(data.message);
        }
      });
    }
  }
};
</script>

<style lang="scss">
.reportBox {
  border: 2px solid #eee;
  width: 100%;
  margin: 10px;
}
.boxRow {
  display: flex;
  border-bottom: 1px solid #e6e6e6;
}
.br {
  border-right: 1px solid #e6e6e6;
}
.boxtitle {
  padding: 20px;
}
.rowItem {
  flex: 1;
  padding-left: 20px;
  display: flex;
  align-items: center;
  .el-form-item--mini.el-form-item, .el-form-item--small.el-form-item{
    margin-bottom: 0;
  }
}
.pr20 .rowItem {
  padding-right: 20px;
}
.table--border {
  border-collapse: collapse;
  margin-top: 10px;
}
.table--border th {
  padding: 10px;
}
.tborder {
  td,
  th {
    border: 1px solid #e6e6e6;
    padding-left: 10px;
  }
}
</style>